package com.heima.wemedia.controller.v1;

import com.heima.model.comment.dtos.ApCommentDto;
import com.heima.model.comment.dtos.CommentStatusDto;
import com.heima.model.comment.dtos.NewsCommentDto;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.wemedia.service.CommentMangerService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/api/v1/comment/manage")
@Slf4j
public class CommentManageController {

    @Autowired
    private CommentMangerService commentMangerService;

    /**
     * 作者查看评论详情
     * @param dto
     * @return
     */
    @PostMapping("list")
    public ResponseResult list(@RequestBody NewsCommentDto dto){
        return commentMangerService.list(dto);
    }


    /**
     * 作者回复评论
     */
    @PostMapping("comment_repay")
    public ResponseResult commentRepay(@RequestBody ApCommentDto dto){
        return commentMangerService.commentRepay(dto);
    }



}
